import tkinter
import tkinter.messagebox


def main():
    flag = True

    def change_label_text():
        nonlocal flag